using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.Linq;
using System.Threading.Tasks;
using WalkingTec.Mvvm.Core;
using WalkingTec.Mvvm.Core.Extensions;
using HengTong.Model.Db.System;


namespace HengTong.ViewModel._Admin.SysNotificationVms
{
    public partial class SysNotificationTemplateVm : BaseTemplateVM
    {
        [Display(Name = "标题")]
        public ExcelPropety TitleExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.Title);
        [Display(Name = "内容")]
        public ExcelPropety ContentExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.Content);
        [Display(Name = "路由")]
        public ExcelPropety RouteExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.RouteId);
        public ExcelPropety CategoryExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.CategoryId);
        [Display(Name = "业务类型")]
        public ExcelPropety BusinessTypeExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.BusinessType);
        [Display(Name = "业务数据ID")]
        public ExcelPropety BusinessIdExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.BusinessId);
        [Display(Name = "发送人姓名")]
        public ExcelPropety SenderNameExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.Sender);
        [Display(Name = "接收人姓名")]
        public ExcelPropety ReceiverNameExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.Receiver);
        [Display(Name = "阅读状态")]
        public ExcelPropety StatusExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.Status);
        [Display(Name = "优先级")]
        public ExcelPropety PriorityExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.Priority);
        [Display(Name = "是否置顶")]
        public ExcelPropety IsTopExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.IsTop);
        [Display(Name = "发送时间")]
        public ExcelPropety SendTimeExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.SendTime);
        [Display(Name = "阅读时间")]
        public ExcelPropety ReadTimeExcel = ExcelPropety.CreateProperty<SysNotification>(x => x.ReadTime);

	    protected override void InitVM()
        {
            RouteExcel.DataType = ColumnDataType.ComboBox;
            RouteExcel.ListItems = DC.Set<SysBillRoute>().GetSelectListItems(Wtm, y => y.Name);
            CategoryExcel.DataType = ColumnDataType.ComboBox;
            CategoryExcel.ListItems = DC.Set<SysNotificationCategory>().GetSelectListItems(Wtm, y => y.Name);
        }

    }

    public class SysNotificationImportVm : BaseImportVM<SysNotificationTemplateVm, SysNotification>
    {

    }

}
